package org.csu.small.service;

import org.csu.small.common.UniformResponse;
import org.csu.small.entity.Order;
import org.csu.small.vo.OrderPageVo;
import org.csu.small.vo.OrderVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * @author SongYaolun
 * @version 1.0
 * @date 2020/6/27 11:09
 */
public interface IOrderService {
    public UniformResponse<OrderVo> createOrder(Integer userId, Integer shippingId);
    public UniformResponse<OrderVo> getOrderDetail(BigInteger orderNo);
    public UniformResponse<String> confirm(BigInteger orderNo);
    public UniformResponse<String> cancel(BigInteger orderNo);
    public UniformResponse<String> refund(BigInteger orderNo);
    public UniformResponse getUserOrderList(Integer userId,  int current, int size);
    public UniformResponse<Object> getOrderSearch(BigInteger orderNo, String productName, int offset, int limit, Integer status);
//    public void aliPay(HttpServletResponse response, HttpServletRequest request, BigInteger orderNo) throws IOException;
    public UniformResponse pay(BigInteger orderNo, String path) throws UnsupportedEncodingException;
    public UniformResponse aliCallback(Map<String, String> params);
    public UniformResponse queryOrderPayStatus(BigInteger orderNo);
    public UniformResponse getOrderCartProduct(Integer userId);


    public UniformResponse<OrderPageVo> manageList(int current, int size);
    public UniformResponse<OrderVo> manageDetail(BigInteger orderNo);
    public UniformResponse<String> manageSendGoods(BigInteger orderNo);


//    public UniformResponse<String> delete(BigInteger orderNo);
}
